package com.ruoyi.youtian.mapper;


import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.youtian.domain.TWorkspaceCategory;
import com.ruoyi.youtian.domain.vo.LinearGraphVo;
import com.ruoyi.youtian.domain.vo.PieChartVo;
import com.ruoyi.youtian.domain.vo.PointVo;
import com.ruoyi.youtian.domain.vo.SourceTagVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 工作区分类Mapper接口
 *
 * @author ruoyi
 * @date 2022-09-07
 */
public interface TWorkspaceCategoryMapper
{
    /**
     * 查询工作区分类
     *
     * @param workspaceCategoryId 工作区分类主键
     * @return 工作区分类
     */
    public TWorkspaceCategory selectTWorkspaceCategoryByWorkspaceCategoryId(Long workspaceCategoryId);

    /**
     * 查询工作区分类列表
     *
     * @param tWorkspaceCategory 工作区分类
     * @return 工作区分类集合
     */
    @DataScope(deptAlias = "d")
    public List<TWorkspaceCategory> selectTWorkspaceCategoryList(TWorkspaceCategory tWorkspaceCategory);

    /**
     * 新增工作区分类
     *
     * @param tWorkspaceCategory 工作区分类
     * @return 结果
     */
    public int insertTWorkspaceCategory(TWorkspaceCategory tWorkspaceCategory);

    /**
     * 修改工作区分类
     *
     * @param tWorkspaceCategory 工作区分类
     * @return 结果
     */
    public int updateTWorkspaceCategory(TWorkspaceCategory tWorkspaceCategory);

    /**
     * 删除工作区分类
     *
     * @param workspaceCategoryId 工作区分类主键
     * @return 结果
     */
    public int deleteTWorkspaceCategoryByWorkspaceCategoryId(Long workspaceCategoryId);

    /**
     * 批量删除工作区分类
     *
     * @param workspaceCategoryIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteTWorkspaceCategoryByWorkspaceCategoryIds(Long[] workspaceCategoryIds);

    /**
     * 查看是否含有子集
     * @param workspaceCategoryId
     * @return
     */
    public int hasChildByWorkspaceCategoryId(Long workspaceCategoryId);

    /**
     * 根据工作区查询点位属性列表
     * @param workspaceIdList
     * @return
     */
    @DataScope(deptAlias = "tag")
    public List<PointVo> selectPointListByWorkspaceIdList(@Param("list") List<Long> workspaceIdList,@Param("pointName") String pointName,@Param("tWorkspaceCategory") TWorkspaceCategory tWorkspaceCategory);

    public List<PointVo> selectDevicePointList(PointVo pointVo);


    List<LinearGraphVo> getLineargraph(LinearGraphVo linearGraphVo);

    List<Map<String,Object>> getPieChart(PieChartVo pieChartVo);


    List<PieChartVo> selectcategory(Integer scene_id);
}
